package com.baidumap.administrator.happystudy.module.fenlei.model;

import com.ab.util.AbJsonUtil;

import java.util.List;

/**
 * 描述：
 * 作者：xiaoxing on 17/4/19 06:21
 * 邮箱：2235445233@qq.com
 */
public class IndexProducts {


    /**
     * code : 200
     * msg : success
     * data : [{"product_id":"2983","product_name":"保养霜","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-17/58f4009f642fd.jpg","price":"200.00","price_tuangou":"180.00"},{"product_id":"2982","product_name":"保湿面霜","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-17/58f3fcd97efb4.jpg","price":"78.00","price_tuangou":"65.00"},{"product_id":"2981","product_name":"面霜","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-17/58f3fc722fc49.jpg","price":"80.00","price_tuangou":"35.00"},{"product_id":"1779","product_name":"MOB樱桃色口红","product_pic1":"http://bc.bvhao.cc","price":"138.00","price_tuangou":"128.00"},{"product_id":"1777","product_name":"DHC润唇膏","product_pic1":"http://bc.bvhao.cc","price":"98.00","price_tuangou":"87.00"},{"product_id":"1750","product_name":"面霜","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-16/58f300ec61bef.jpg","price":"3.50","price_tuangou":"3.50"},{"product_id":"1707","product_name":"口红","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-14/58f044fe9966e.jpg","price":"6.00","price_tuangou":"5.90"},{"product_id":"1706","product_name":"香水","product_pic1":"http://bc.bvhao.cc/Uploads/2017-04-14/58f04517af294.jpg","price":"5.00","price_tuangou":"4.90"}]
     */

    private String code;
    private String msg;
    private List<DataBean> data;

    /**
     * 用json构造自己
     *
     * @param json
     */
    public IndexProducts(String json) {
        IndexProducts result = AbJsonUtil.fromJson(json, this.getClass());
        this.code = result.getCode();
        this.msg = result.getMsg();
        this.data = result.getData();

    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean {
        /**
         * product_id : 2983
         * product_name : 保养霜
         * product_pic1 : http://bc.bvhao.cc/Uploads/2017-04-17/58f4009f642fd.jpg
         * price : 200.00
         * price_tuangou : 180.00
         */

        private String product_id;
        private String product_name;
        private String product_pic1;
        private String price;
        private String price_tuangou;

        public String getProduct_id() {
            return product_id;
        }

        public void setProduct_id(String product_id) {
            this.product_id = product_id;
        }

        public String getProduct_name() {
            return product_name;
        }

        public void setProduct_name(String product_name) {
            this.product_name = product_name;
        }

        public String getProduct_pic1() {
            return product_pic1;
        }

        public void setProduct_pic1(String product_pic1) {
            this.product_pic1 = product_pic1;
        }

        public String getPrice() {
            return price;
        }

        public void setPrice(String price) {
            this.price = price;
        }

        public String getPrice_tuangou() {
            return price_tuangou;
        }

        public void setPrice_tuangou(String price_tuangou) {
            this.price_tuangou = price_tuangou;
        }
    }
}
